From: Jasper St. Pierre Date: Fri, 26 Apr 2013 04:25:14 +0000 (-0400) Subject: network: Properly disconnect from the state-changed signal X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4270 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=dbb39d366ed6a77271a7ff307ce530d085a8cde2;p=gnome-shell.git network: Properly disconnect from the state-changed signal The destroy signal never gets emitted, so we need to properly disconnect manually when we destroy the wrapper. https://bugzilla.gnome.org/show_bug.cgi?id=698918 --- diff --git a/js/ui/status/network.js b/js/ui/status/network.js index 534c0ea37..f4ff9196b 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -1916,11 +1916,6 @@ const NMApplet = new Lang.Class({ wrapper._deviceStateChangedId = wrapper.connect('state-changed', Lang.bind(this, function(dev) { this._syncSectionTitle(dev.category); })); - wrapper._destroyId = wrapper.connect('destroy', function(wrapper) { - wrapper.disconnect(wrapper._activationFailedId); - wrapper.disconnect(wrapper._deviceStateChangedId); - wrapper.disconnect(wrapper._destroyId); - }); let section = this._devices[wrapper.category].section; section.addMenuItem(wrapper.statusItem); @@ -1952,6 +1947,8 @@ const NMApplet = new Lang.Class({ }, _removeDeviceWrapper: function(wrapper) { + wrapper.disconnect(wrapper._activationFailedId); + wrapper.disconnect(wrapper._deviceStateChangedId); wrapper.destroy(); let devices = this._devices[wrapper.category].devices;